package main

import (
	"academic/global"
	"academic/initialize"
)

func main() {
	router := initialize.Routers()
	global.GvaViper = initialize.Viper()
	global.GvaDb = initialize.Gorm()
	// 程序结束前关闭数据库连接
	if global.GvaDb != nil {
		db, _ := global.GvaDb.DB()
		defer db.Close()
	}
	_ = router.Run(":8090")
}
